package com.py.credit.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.py.credit.dao.StepLogDao;
import com.py.credit.entity.StepLog;
import com.py.credit.service.StepLogService;
import com.py.framework.core.ds.DataSourceType;
import com.py.framework.core.ds.DynamicDataSource;

@Service
public class StepLogServiceImpl implements StepLogService {

	@Autowired
	private StepLogDao stepLogDao;

	@Override
	public void addStepLog(String batchId, String logDesc) {
		stepLogDao.addStepLog(batchId, logDesc);
	}
	
	@DynamicDataSource(DataSourceType.DS_MASTER)
	@Override
	public List<StepLog> selectList(String batchId) {
		return stepLogDao.selectList(batchId);
	}

}
